package com.atjava.webspider.util;

import javax.swing.JTextArea;

import com.atjava.webspider.gui.SpiderMainGui;

public class LogUtil {

	public static void log(String message){
		//System.err.println(message);
		SpiderMainGui main = SpiderMainGui.getInstance();
		JTextArea console = main.getJTextAreaConsole();
		console.append(message);
		console.append("\r\n");
		console.setCaretPosition(console.getText().length());
		
		System.err.println(message);
	}
	public static void info(String message){
		System.err.println("[Webspider]:" + message);
	}
	public static void log(Throwable e){
		e.printStackTrace();
	}
	
	public static void log(String message,Throwable e){
		e.printStackTrace();
	}
}
